﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace apparatus
{
    public partial class frmpasschange : Form
    {
        public frmpasschange()
        {
            InitializeComponent();
        }

        private void btnsubmit_Click(object sender, EventArgs e)
        {
            if (tbpass1.Text != "" && (tbpass1.Text == tbpass2.Text))
            {
                this.userTableAdapter1.checkuser(db1DataSet1.user, tbuser.Text, tbpass.Text);
                if (this.db1DataSet1.user.Count != 0)
                {
                    //userTableAdapter1.UpdatePass(tbpass1.Text, tbuser.Text);
                    userTableAdapter1.UpdatePass("bbb", "aaa");
                    MessageBox.Show("更改成功！");
                }
                else
                { MessageBox.Show("用户名或密码有误！"); }
            }
            else { MessageBox.Show("两次密码输入不一致！"); }
        }

        private void frmpasschange_Load(object sender, EventArgs e)
        {
            
        }
    }
}
